import { useState , Suspense } from 'react'
import { Link , useRoutes ,  Outlet } from "react-router-dom";
import Router from './router/index'

function App() {
  const element = useRoutes(Router)
  const [count, setCount] = useState(0)

  const toHome=()=>{
    console.log('234')
  }

  return (
    <div className="App">
      {/*<Link to='/home'>Home</Link>*/}
      {/*<Link to='/about'>About</Link>*/}
      {/*<Link to='/user'>User</Link>*/}
      {/*占位组件*/}
      {/*<Suspense>*/}
        {element}
      {/*</Suspense>*/}
    </div>
  )
}

export default App
